import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home,
    redirect: "index"
  },
  {
    path: "/index",
    name: "主页",
    component: () => import('../views/index.vue'),
    // redirect: "index"
  },
  {
    path: "/my",
    name: "我的",
    component: () => import('../views/my.vue')
  },
  {
    path: "/login",
    name: "login",
    component: () => import('../views/login.vue')
  },
  {
    path: "/integral",
    name: "积分商城",
    component: () => import('../views/integral.vue')
  },
  {

    path: "/order",
    name: "进行中",
    component: () => import('../views/orderPage.vue')
  },
  {
    path: "/startCharge",
    name: "开始充电",
    component: () => import('../views/startCharge.vue')
  },
  {
    path: "/subscribe",
    name: "预约中",
    component: () => import('../views/subscribe.vue')
  },
  {
    path: "/subscribeCharge",
    name: "进行中",
    component: () => import('../views/subscribeCharge.vue')
  },
  {
    path: "/siteinfo",
    name: "站点信息",
    component: () => import('../views/siteInfo.vue')
  },
  {
    path: "/chargeing",
    name: "正在充电",
    component: () => import('../views/chargeing.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: "/StartCharging",
    name: "开始充电",
    // component: () => import('../views/StartCharging.vue')
  },
  {
    path: "/Indent",
    name: "订单进行中",
    // component: () => import('../views/Indent.vue')
  },
  {
    path: "/Pay",
    name: "支付",
    component: () => import('../views/Pay.vue')
  }, {
    path: "/PaySuccess",
    name: "支付成功",
    component: () => import('../views/PaySuccess.vue')
  }, {
    path: "/register",
    name: "注册",
    component: () => import('../views/register.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
